{include file="public/_meta" /}
{include file="public/_nav" /}

<div class="container admin-body">
    <div class="row">
        <div class="col-xs-2 side-bar">
            {include file="public/_sidebar" /}
        </div>
        <div class="col-xs-10">
            <ol class="breadcrumb">
                <li>博文管理</li>
                <li>文章列表</li>
            </ol>
            <a href="javascript:location.replace(location.href)" class="btn btn-primary btn-xs btn-refresh pull-right"><span class="glyphicon glyphicon-refresh"></span></a>
            <div class="alert alert-danger alert-dismissable fade in hidden">
                <button type="button" class="close" data-dismiss="alert"><span>&times;</span></button>
                <strong>Dreamphp!</strong> 删除成功！
            </div>
            <h2>文章列表</h2>
            <table class="table table-bordered table-hover table-striped">
                <caption>{if condition="$articleInfo->count() gt 0"}共计{$articleInfo->count()}条{else /}无数据{/if}</caption>
                <thead>
                <tr>
                    <th>ID</th>
                    <th>文章标题</th>
                    <th>所属栏目</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                {volist name="articleInfo" id="vo"}
                <tr>
                    <td>{$vo.id}</td>
                    <td class="title">{$vo.title}</td>
                    <td>{$vo.cate.catename}</td>
                    <td>
                        <a href="{:url('admin/home/articleedit', ['id' => $vo.id])}" class="btn btn-primary btn-sm edit">编辑</a>
                        <a href="{:url('admin/home/articledel', ['id' => $vo.id])}" class="btn btn-danger btn-sm del" onclick="return confirm('确定删除吗？')">删除</a>
                    </td>
                </tr>
                {/volist}
                </tbody>
            </table>
            <nav>
                {$articleInfo->render()|raw}
                </ul>
            </nav>
        </div>
    </div>
</div>

{include file="public/_footer" /}
{include file="public/_js" /}
</body>
</html>